package com.dev.common.util;

import android.graphics.Typeface;

import com.dev.MyAppliction;

/**
 * Created by self on 16/6/14.
 */
public class ConfigUtil {

    private static ConfigUtil instance;

    private final static String fontPath = "iconfont/iconfont.ttf";
    private Typeface iconfont;

    private ConfigUtil() {
    }

    public static ConfigUtil build() {
        if (instance == null) instance = new ConfigUtil();
        return instance;
    }

    public Typeface getIconfont() {
        if (iconfont == null)
            iconfont = Typeface.createFromAsset(MyAppliction.getInstance().getAssets(), fontPath);
        return iconfont;
    }
}
